<template>
  <div class="authentication">
    <div class="com-top-nav">
      <van-nav-bar
        title="我的钱包"
        left-arrow
        @click-left="onClickLeft"
      />
    </div>
    <div>
      <div class="money">
        <p>{{amt}}<span> 元</span></p>
      </div>
        <!-- <van-button @click="handleSubmit">充值</van-button> -->
        <van-button style="margin:20px;width:calc(100% - 40px);background:#38f;border:none;color:#fff;font-size:18px;" type="large" @click="wathandele" block>提现</van-button>
    </div>
  </div>
</template>
<script>

  export default {
    components: {},
    data(){
      return {
        isShowError: false,
        errorTips: '',
        amt:0,
      }
    },
    mounted() {},
    created(){
      // this.amt = JSON.parse(sessionStorage.getItem('user')).balance
      this.axios.get('/api/mine',{params:{uid:JSON.parse(sessionStorage.getItem('user')).uid}}).then(res=>{
        if(res.data.err_code ==0){
          console.log(res.data)
          this.amt = res.data.data.balance;
        }
      })
    },
    methods: {
      wathandele(){
        if(this.amt<10000){
          this.$toast({message:"100元起提哦"})
        }
      },
      onClickLeft() {
        this.$router.go(-1);
      },
      handleSubmit() {}
    }
  }
</script>

<style scoped lang="less" type="text/less">
  @import url('../../../static/style/var');
  .money {
    background-color: @blue-color;
    text-align: center;
    padding: 20px 0;
    p {
      font-size: @big-title-font-size;
      color: #ffffff;
      line-height: 1.5;
      span {
        font-size: @normal-font-size;
      }
    }
  }
  .button {
    display: flex;
    justify-content: space-around;
    padding-left: 10px;
    padding-right: 10px;
    margin-top: 30px;
    button {
      width: 30%;
    }
  }
</style>
